package editor.modelo;

import java.util.ArrayList;
import java.util.List;


public class Floor {

	protected Space miInfo;
	protected List<Space> espacios;
	protected List<Portal> portales;
	protected List<LandMark> landmarks;
	
	protected String buildingName;
	protected Space referencia;
	protected int alturaAbsouta;
	
	public Space getReferencia() {
		return referencia;
	}

	public void setReferencia(Space referencia) {
		this.referencia = referencia;
	}

	public int getAlturaAbsouta() {
		return alturaAbsouta;
	}

	public void setAlturaAbsouta(int alturaAbsouta) {
		this.alturaAbsouta = alturaAbsouta;
	}

	protected int level;

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public Floor() {
		super();
	}

	public void inicializar() {
		this.espacios = new ArrayList<Space>();
		this.portales = new ArrayList<Portal>();
		this.landmarks = new ArrayList<LandMark>();
		miInfo = new Space();
	}
	public String getbuildingName(){
		return buildingName;
	}
	public void setbuildingName(String name){
		this.buildingName = name;
	}
	
	public String getCompleteFloorName(){
		return buildingName + "/" + miInfo.getId();
	}
	
	public Space findSpacebyId(String id){
		for(Space s: espacios){
			if(s.getId().equals(id)) return s;
		}
		return null;
	}
	
	public String getFloorName(){
		return miInfo.getId();
	}
	
	public void setFloorName(String nombre)
	{
		this.miInfo.setId(nombre);
	}

	public Space getFloorSpace() {
		return miInfo;
	}

	public void setFloorSpace(Space piso) {
		this.miInfo = piso;
	}

	public List<Space> getEspacios() {
		return espacios; 
	}

	public List<Portal> getPortales() {
		return portales;
	}
	
	public List<LandMark> getLandmarks() {
		return landmarks;
	}

	public void setLandmarks(List<LandMark> landmarks) {
		this.landmarks = landmarks;
	}


}